package ua.com.stormlabs.tiny.licenseserver.beans;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author Maxim Bondarenko
 * @version 1.0 10/29/11
 */

public class License {
    @NotNull
    @Size(min = 5, max = 20, message = "License name length must be between 5 and 20 characters")
    private String licenseName;

    private int id;

    public License() {
    }

    public License(String licenseName, int id) {
        this.licenseName = licenseName;
        this.id = id;
    }

    public String getLicenseName() {
        return licenseName;
    }

    public void setLicenseName(String licenseName) {
        this.licenseName = licenseName;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
}
